package wei.qiang.ye;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import wei.qiang.ye.springcomponentdemo.service.CalculateService;

@SpringBootApplication
public class SpringComponentDemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context1 = new SpringApplicationBuilder(SpringComponentDemoApplication.class)
                .web(WebApplicationType.NONE)
                .profiles("java7")
                .run(args);

        CalculateService service = context1.getBean(CalculateService.class);
        System.out.println("求合结果： " + service.sum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
    }

}
